import java.util.Scanner;

public class a003_兩光法師占卜術 {

		public static void main(String[] args) {
			Scanner input = new Scanner(System.in);
			int m, d, s;
			
			while(input.hasNext()) {
				m = input.nextInt();
				d = input.nextInt();
				s = S(m, d);
				if(s == 0)
					System.out.println("普通");
				else if(s == 1)
					System.out.println("吉");
				else
					System.out.println("大吉");
			}
		}
		
		//-----------------------------------------------------------
		
		public static int S(int M, int D) {
			int s = 0;
			s = ( M * 2 + D ) % 3;
			return s;
		}
		
}